<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>
        <title>#{mbSiteProperties.site}</title>
    </h:head>
    <f:view contentType="text/html">
        <f:event type="preRenderView" listener="#{mbCatalogue.appelCatalogue()}" />
    </f:view>


    <p:layout fullPage="true">

        <p:layoutUnit position="north" size="100" resizable="false" closable="false" collapsible="false">
            <ui:include src="#{mbSiteProperties.bandeauNord}" />
        </p:layoutUnit>
        <p:layoutUnit position="west" size="200" header="Catégories" resizable="true" closable="false" collapsible="true">
            <h:form>
                <p:menu id="myMenu">
                    <c:forEach items="#{mbCatalogue.categories}" var="categorie">
                        <p:menuitem value="#{categorie.nomCategorie}"
                                    ajax="false"
                                    action="#{mbCatalogue.afficherProduitsParCategorie(categorie)}"/>
                    </c:forEach>
                </p:menu>
            </h:form>
        </p:layoutUnit>
        <p:layoutUnit position="center">
             <ui:include src="#{mbSiteProperties.pageCentrale}" />
        </p:layoutUnit>
    </p:layout>

</html>

